package cn.xhb.service.impl;

import cn.xhb.domain.Content;
import cn.xhb.mapper.ContentMapper;
import cn.xhb.service.ContentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("ContentService")
public class contentServiceImpl implements ContentService {
    @Resource
    private ContentMapper contentMapper;

    public void save(Content content) {
        contentMapper.save(content);
    }

    public List<Content> findAll(int userId) {
     List<Content> contentList=contentMapper.findAll(userId);
        return contentList;
    }

    public void del(int id) {
        contentMapper.del(id);
    }

    public List<Content> find() {
        List<Content> contentList = contentMapper.find();
        return contentList;
    }
}
